// Source File Name:   RoleFactory.java

package com.sunwayhorizo.health.hl7.factories;

import com.sunwayhorizo.health.hl7.common.Hl7Exception;
import com.sunwayhorizo.health.hl7.common.MessageUtils;
import com.sunwayhorizo.health.hl7.common.VersionInfo;
import com.sunwayhorizo.health.hl7.datatypes.CE;
import com.sunwayhorizo.health.hl7.datatypes.CS;
import com.sunwayhorizo.health.hl7.datatypes.SET_II;
import com.sunwayhorizo.health.hl7.rim.Access;
import com.sunwayhorizo.health.hl7.rim.Employee;
import com.sunwayhorizo.health.hl7.rim.Hl7Entity;
import com.sunwayhorizo.health.hl7.rim.LicensedEntity;
import com.sunwayhorizo.health.hl7.rim.Patient;
import com.sunwayhorizo.health.hl7.rim.Role;

// Referenced classes of package oracle.apps.ctb.hl7.factories:
//            DataTypeFactory, ReferenceModifier

public abstract class RoleFactory
{

    public static final String RCS_ID = "$Header: RoleFactory.java 1.0 2008/02/27 04:17:02 atomlins noship $";
    public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: RoleFactory.java 1.0 2008/02/27 04:17:02 atomlins noship $",
        "oracle.apps.ctb.hl7.factories");
    // protected RimServiceBean session;
    // protected FactoryValidation validation;
//    protected DataTypeFactory dataTypeFactory;
    private static final String PARAMETER_KEY = "PARAM1";
    private static final String CAUSE_KEY = "CAUSE";
    private static final String NESTED_CODE = "HTB____";
    private static final String PARAMETER_MISSING_CODE = "CTB_NULL_PARAMETER";
    private static final String PARAMETER_MISSING_MESSAGE = "Invalid parameter was passed into this API. Required parameter [&PARAM1] was null.";
    private static final String NESTED_MESSAGE = "An error occurred while creating an instance of RoleFactory: &CAUSE";


    public static synchronized RoleFactory getInstance()
    {
        return new RoleFactoryImpl();
    }


    // public static synchronized RoleFactory getInstance(
    // ServiceLocator servicelocator) {
    // if (servicelocator == null)
    // throw newNullException("sl");
    // RoleFactoryImpl rolefactoryimpl;
    // try {
    // rolefactoryimpl = new RoleFactoryImpl(servicelocator);
    // } catch (Hl7Exception ctbexception) {
    // throw newNestedException(ctbexception);
    // }
    // return rolefactoryimpl;
    // }

    public abstract Role newRole(CS cs, CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newIdentifiedEntity(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    /**
     * 创建模板类型角色 <br>
     * 作者 jinzw <br>
     * 创建日期 2010-12-15 <br>
     * 
     * @param ce
     * @param entity
     * @param entity1
     * @param set_ii
     * @return
     * @throws Hl7Exception
     *             Role
     */
    public abstract Role newTempClassRole(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    /**
     * 模板文件角色创建 <br>
     * 作者 jinzw <br>
     * 创建日期 2010-12-16 <br>
     * 
     * @param ce
     * @param entity
     * @param entity1
     * @param set_ii
     * @return
     * @throws Hl7Exception
     *             Role
     */
    public abstract Role newTempFileRole(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Patient newPatient(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newAssignedEntity(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newAgent(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newContact(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newEmergencyContact(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newNextOfKin(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newSigningAuthority(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newGuardian(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newCitizen(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newCoveredParty(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newResearchInvestigator(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newResearchSponsor(CE ce, Hl7Entity entity, Hl7Entity entity11, SET_II set_ii) throws Hl7Exception;


    public abstract Employee newEmployee(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newSysRole(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Employee newMilitaryPerson(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newGuarantor(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract LicensedEntity newLicensedEntity(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract LicensedEntity newNotaryPublic(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract LicensedEntity newHealthcareProvider(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newPayee(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newPayor(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newPolicyHolder(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newQualifiedEntity(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newResearchSubject(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newSponsor(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newStudent(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newUnderwriter(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newPersonalRelationship(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Access newAccess(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newBirthplace(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newDistributedMaterial(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newRetailedMaterial(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newExposedEntity(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newHeldEntity(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newHealthChart(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newManufacturedProduct(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newTherapeuticAgent(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newMaintainedEntity(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newOwnedEntity(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newRegulatedProduct(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newServiceDeliveryLocation(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract LicensedEntity newDedicatedServiceDeliveryLocation(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newIncidentalServiceDeliveryLocation(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newTerritory(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newWarrantedProduct(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newGeneralization(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newGeneric(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newInstance(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newSubsumer(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newSubsumedBy(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newContent(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newIngredient(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newActiveIngredient(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newActiveMoiety(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newAdditive(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newBaseIngredient(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newInactiveIngredient(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newColorAdditive(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newFlavorAdditive(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newPreservative(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newStabilizer(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newLocatedEntity(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newStoredEntity(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newMember(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newPart(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newSpecimen(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newAliquot(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newIsolate(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newCareGiver(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newCaseSubject(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newInvestigatedSubject(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role makeReference(ReferenceModifier referencemodifier, CS cs, CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii, int i)
        throws Hl7Exception;


    public abstract Role newClinicIndex(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    public abstract Role newClinicGroup(CE ce, Hl7Entity entity, Hl7Entity entity1, SET_II set_ii) throws Hl7Exception;


    private static RuntimeException newNullException(String s)
    {
        String as[] = { "PARAM1" };
        String as1[] = { s };
        String s1 = MessageUtils.getMessage("Invalid parameter was passed into this API. Required parameter [&PARAM1] was null.", as, as1);
        return new NullPointerException(s1);
    }


    private static RuntimeException newNestedException(Hl7Exception ctbexception)
    {
        String as[] = { "CAUSE" };
        String as1[] = { ctbexception.getMessage() };
        String s = MessageUtils.getMessage("An error occurred while creating an instance of RoleFactory: &CAUSE", as, as1);
        return new RuntimeException(s);
    }


    public RoleFactory()
    {
    }


    public abstract Role newRole(CS classCode, CE roleCode, Hl7Entity entity, Hl7Entity entity1) throws Hl7Exception;

}
